package com.example.listossimage.config;

import org.mapstruct.Qualifier;
import org.springframework.boot.jdbc.DataSourceBuilder;
import org.springframework.context.annotation.Configuration;
import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;

import javax.sql.DataSource;

@Configuration
public class DataSourceConfig {

    private static final String Master_Source_Key = "masterSourceKey";
    private static final String Slave_Source_Key = "slaveSourceKey";

    private Class<? extends DataSource> dataSourceType;


    public DataSource createMasterSource() {
        return DataSourceBuilder.create().type(dataSourceType).build();
    }


    public DataSource slaveMasterSource() {
        return DataSourceBuilder.create().type(dataSourceType).build();
    }


//    public AbstractRoutingDataSource routingDataSource(@Qualifier("masterSourceKey") DataSource) {
//
//    }
}
